package com.coordinate.core.message.impl;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import com.coordinate.core.message.Message;
import com.coordinate.core.message.Location;

import javax.jdo.annotations.*;

import com.google.appengine.api.datastore.Key;


@PersistenceCapable(identityType = IdentityType.DATASTORE, detachable ="true")
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  public abstract class CMessage implements Message{
    
	
	@PrimaryKey
	@Persistent (valueStrategy = IdGeneratorStrategy.IDENTITY)
	protected Key mKey;
	
	
	@Persistent(defaultFetchGroup="true")
	Date  mReceivedDate = new Date();
	@Persistent(defaultFetchGroup="true")
	Date  mScheduledDate = new Date();
	@Persistent
	String mSubject;

	public CMessage()
	{
		System.out.println("Called : Abstract class constructor");
	}
	
	public Key getKey() {
		// TODO Auto-generated method stub
		return this.mKey;
	}
	
	

	public Date getReceivedDate() {
		// TODO Auto-generated method stub
		return this.mReceivedDate;
	}
	
	public void setReceivedDate(Date pReceivedDate) {
		// TODO Auto-generated method stub
		this.mReceivedDate = pReceivedDate;
	}


	
	public Date getScheduledDate() {
		// TODO Auto-generated method stub
		return this.mScheduledDate;
	}
	
	public void setScheduledDate(Date pScheduledDate) {
		// TODO Auto-generated method stub
		this.mScheduledDate = pScheduledDate;
	}
	public List<Location> getRecepientList() {
		// TODO Auto-generated method stub
		return null;
	}

	public String getSubject() {
		// TODO Auto-generated method stub
		return this.mSubject;
	}

	public void setSubject(String pSubject) {
		this.mSubject = pSubject;
		
	}

	}
